//
//  UIButton+RBAdd.m
//  Culture
//
//  Created by Lan on 2017/8/11.
//  Copyright © 2017年 SummerTea. All rights reserved.
//

#import "UIButton+RBAdd.h"

@implementation UIButton(RBAdd)

- (void)rbSetFont: (UIFont *)font
{
    self.titleLabel.font = font;
}

- (void)rbSetFontSize: (CGFloat)size
{
    self.titleLabel.font = [UIFont systemFontOfSize:size];
}

- (void)rbSetTitle: (NSString *)text
{
    [self setTitle:text forState:UIControlStateNormal];
}

- (void)rbSetTitleColor: (UIColor *)color
{
    [self setTitleColor:color forState:UIControlStateNormal];
}

- (void)rbSetImage: (UIImage *)img
{
    [self setImage:img forState:UIControlStateNormal];
}

- (void)rbSetBgImage: (UIImage *)img
{
    [self setBackgroundImage:img forState:UIControlStateNormal];
}

- (void)rbSetBgColor: (UIColor *)color
{
    self.backgroundColor = color;
}

- (void)rbAddTarget:(id)target action:(SEL)action
{
    [self addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
}

@end
